<?php
use yii\helpers\Url;
use yii\web\View;
use app\assets\MonitorAsset;
/* @var $this yii\web\View */
MonitorAsset::register($this);
$this->title = '投放监控 -- Sacrebleu DSP';
?>
<div class="col-sm-6">
  <ol class="breadcrumb">
   	<li>运营管理</li>
    <li>投放监控</li>
    <li class="active">数据</li>
  </ol>
</div>
</div>
<div class="row">
	<h3 class="page-title">
    <i class="fa fa-desktop"></i>
    投放监控
    <small>数据列表</small>
  </h3>
</div>
<div class="panel">
  <!-- <div class="panel-heading">   
  </div> -->
  <div class="panel-body">
    <div class="panel panel-dotted">
      <div class="panel-heading">
        <h4>
          <i class="fa fa-filter"></i>
          筛选条件
        </h4>
      </div>
      <div class="panel-body">
        <form class="form-horizontal" id="filter-frm" method="POST" action="#" role="form">
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_advertiser" class="col-sm-4 control-label"> 广告主选择：</label>
                <div class="col-sm-8">
                  <select class="form-control data-filter" id="filter_advertiser" name="advertiser" placeholder="选择广告主">
                    <option value="1">Advertiser1</option>
                    <option value="2">Advertiser2</option>
                    <option value="3">Advertiser3</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_market" class="col-sm-4 control-label">选择市场：</label>
                <div class="col-sm-8">
                  <select class="form-control data-filter" id="filter_market" name="market" placeholder="选择市场">
                    <option value="1">Market1</option>
                    <option value="2">Market2</option>
                    <option value="3">Market3</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_campaign" class="col-sm-4 control-label">选择活动：</label>
                <div class="col-sm-8">
                  <select class="form-control data-filter" id="filter_campaign" name="campaign" placeholder="选择活动">
                    <option value="1">Campaign1</option>
                    <option value="2">Campaign2</option>
                    <option value="3">Campaign3</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_launch" class="col-sm-4 control-label">选择投放：</label>
                <div class="col-sm-8">
                  <select class="form-control data-filter" id="filter_launch" name="launch" placeholder="选择投放">
                    <option value="1">Launch1</option>
                    <option value="2">Launch2</option>
                    <option value="3">Launch3</option>
                  </select>
                </div>
              </div>
            </div>
            <div class="col-sm-4">
              <div class="form-group">
                <label for="filter_strategy" class="col-sm-4 control-label">选择策略：</label>
                <div class="col-sm-8">
                  <select class="form-control data-filter" id="filter_strategy" name="strategy" placeholder="选择策略">
                    <option value="1">Strategy1</option>
                    <option value="2">Strategy2</option>
                    <option value="3">Strategy3</option>
                  </select>
                </div>
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-sm-4">
              <div class="form-group">
                <div class="col-sm-8 col-sm-offset-4">
                  <button class="btn btn-success" type="submit" data-loading-text="<i class='fa fa-spinner fa-spin'></i> 查询中..."><i class="fa fa-search"></i> 查询</button>
                </div>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
    <div class="panel panel-dotted">
      <div class="panel-heading">
        <h4>
          <i class="fa fa-table"></i>
          列表数据
        </h4>
      </div>
      <div class="panel-body">
        <div class="row">
          <div class="col-sm-12">
            <div class="table-responsive">
              <table class="table table-hover" id="data-table">
                <thead>
                  <tr>
                    <th class="tab-es">ID</th>
                    <th>策略名称</th>
                    <th>市场</th>
                    <th>投放名称</th>
                    <th>广告主</th>
                    <th>每日预算</th>
                    <th>出价</th>
                    <th>限定条件</th>
                    <th>
                        <p>可竞价数</p>
                        <p>实际竞价数</p>
                        <p>实际竞价率</p>
                    </th>
                    <th>
                        <p>竞价成功数</p>
                        <p>竞价成功率</p>
                        <p>平均竞价单价</p>
                    </th>
                    <th>花费</th>
                    <th>展现数</th>
                    <th>点击数</th>
                    <th>点击率</th>
                    <th>CPM</th>
                    <th>CPC</th>
                  </tr>
                </thead>
                <tbody></tbody>
              </table>
              <table class="table table-condensed table-total">
                <tbody>
                  <tr class="total-title">
                    <td colspan="2" rowspan="2">
                      <strong>总计</strong>
                    </td>
                    <td>每日预算</td>
                    <td>出价</td>
                    <td>限定条件</td>
                    <td>
                        <p>可竞价数</p>
                        <p>实际竞价数</p>
                        <p>实际竞价率</p>
                    </td>
                    <td>
                        <p>竞价成功数</p>
                        <p>竞价成功率</p>
                        <p>平均竞价单价</p>
                    </td>
                    <td>花费</td>
                    <td>展现数</td>
                    <td>点击数</td>
                    <td>点击率</td>
                    <td>CPM</td>
                    <td>CPC</td>
                  </tr>
                  <tr class="total-data">
                    <td>0.00</td>
                    <td>
                      <p class="text-success"><i class="fa fa-rmb"></i> 0.00</p>
                      <p class="text-success"><i class="fa fa-rmb"></i> 0.00</p>
                    </td>
                    <td>--</td>
                    <td>
                      <p class="text-success">0</p>
                      <p class="text-success">0</p>
                      <p class="text-success">0.00 %</p>
                    </td>
                    <td>
                      <p class="text-success">0</p>
                      <p class="text-success">0.00 %</p>
                      <p class="text-success">0</p>
                    </td>
                    <td>0.00</td>
                    <td>0</td>
                    <td>0</td>
                    <td>0.00%</td>
                    <td>
                      <p class="text-default"><i class="fa fa-rmb"></i> 0.00</p>
                      <p class="text-success"><i class="fa fa-rmb"></i> 0.00</p>
                    </td>
                    <td>
                      <p class="text-default"><i class="fa fa-rmb"></i> 0.00</p>
                      <p class="text-success"><i class="fa fa-rmb"></i> 0.00</p>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
    </div>  
  </div>
</div>
<?php
    $dataUrl = Yii::getAlias('@web').'/response/monitor/monitorDataList.php';
    $this->registerJs("SL.setVar('MONITOR_DATA_LIST','$dataUrl');", View::POS_END);
    $this->registerJsFile("@web/js/monitor/sl.monitorList.js", ['depends' => 'app\assets\MonitorAsset']);
?>